package com.dzsw.terasoluna.boot.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SpringDocConfig {

    @Bean
    public OpenAPI api() {
        return new OpenAPI()
                .info(new Info()
                        .title("Terasoluna Boot")
                        .description("Terasoluna Boot Sample")
                        .version("1.0.0"))
                .externalDocs(new ExternalDocumentation()
                        .description("Terasoluna Boot Sample 2")
                );
    }

//    @Bean
//    public GroupedOpenApi publicApi() {
//        return GroupedOpenApi.builder()
//                .group("terasoluna")
//                .pathsToMatch("/**")
//                .build();
//    }
}
